<!DOCTYPE >
<html lang="zh-cn">
<head>
	<title>后台管理-功能</title>
    <% include ../partials/head %>
    <script type="text/javascript">
        oTopic={
            operator:function(){

            },
            init:function(){
                this.operator();
            }
        }

        $(document).ready(function(){
            oTopic.init();
        })
    </script>

</head>
<body>
	<header>
    <% include ../partials/header %>
  </header>
  <div class="ch-container">
    <div class="row">
      <% include ../partials/sidebar %>
      <!-- 页面内容 -->
      <div id="content" class="col-lg-10 col-sm-10">
        <div class="row">
          <ul class="breadcrumb">
            <li>
                <a href="/admin/gift">礼物管理</a>
            </li>
            <li>
                <a href="">编辑</a>
            </li>
          </ul>
        </div>

        <% if (typeof errMsg != "undefined") { %>
        <div class="alert alert-danger">
            <button type="button" class="close" data-dismiss="alert">&times;</button>
            <strong><%= errMsg %></strong>
        </div>
        <% } %>

        <div class="row">
          <div class="box col-md-12">
            <div class="box-inner">
              <div class="box-header well" data-original-title="">
                <h2><i class="glyphicon glyphicon-edit"></i> 编辑专题 </h2>
              </div>

              <div class="box-content">
                <form role="form" method="post" enctype="multipart/form-data" action="/admin/gift/edit">
                  <div class="form-group">
                      <label>名字:</label>
                      <input type="text" name="name" class="form-control" id="titleText" placeholder="输入标题" value=<%= gift.get("name") %> >
                  </div>
                  <div class="form-group">
                      <label>调整优先级（数字越大优先级越高）:</label>
                      <input type="text" name="priority" class="form-control" id="titleText" placeholder="优先级" value=<%= gift.get("priority") %> >
                  </div>
                  <div class="form-group">
                      <label>价格（时光）:</label>
                      <input type="text" name="price" class="form-control" id="titleText" placeholder="价格" value=<%= gift.get("price") %> >
                  </div>
                    <div class="form-group">
                      <label>介绍:</label>
                      <input type="text" name="info" class="form-control" id="titleText" placeholder="介绍" value=<%= gift.get("info") %> >
                  </div>
                  <div class="form-group">
                      <label>修改礼物图片:</label>
                      <input type="file" name="giftImg">
                      <div>
                        <img style="max-height:200px" class="grayscale" src=<%= gift.get("img")._url %> >
                      </div>
                  </div>
                  <input type="hidden" name="objectId" value=<%= gift.id %> >

                  <button class="btn btn-success" id="saveGift" type="submit"><i class="glyphicon glyphicon-shopping-cart"></i>保存</button>

                </form>
              </div>
            </div>
          </div>
        </div>
      </div>

    </div>

    <% include ../partials/footer %>
  </div>
  <% include ../partials/external %>
</body>
</html>
